<style>
.item-btn{text-align:center;padding-bottom:15px;}
.item-sbtn{padding:15px 35px 30px 35px;}
.item-sbtn .layui-btn{float: right;}
.item-sbtn .layui-form-label{width:auto;padding-left:0;}
.oshare_info{border: 3px dashed #E6E6E6;display:block;padding:20px 0;text-align:center;font-size:12px;color:#666}
.oshare_info a{color:#1284f6;text-decoration:underline;padding-right:10px}
.upbm_not .upbm_label{color:#999}
.upbm_not .layui-input-block{display:none;}
</style>
<form class="layui-form layui-font14" name="order" action>
<div class='dispute_html'>
{foreach $dispute as $v}
	{if $v.role=='buy'}<dl {if $v.ubh==session('usercode')}class='mine'{/if}><img src='{:uc_buy($v.ubh)['tx']}' class='avatar'><dt><cite>{if uc_buy($v.ubh)['bh']==session('usercode')}<font color="#247fbd">您</font>{else}<font color="#ff0000">对方</font>{/if}</cite><cite>退款原因</cite><cite>{$v.sj}</cite></dt>
	<dd> {$v.txt} </dd>
	</dl>{/if}
	
	{if $v.role=='sell'}<dl {if $v.ubh==session('usercode')}class='mine'{/if}><img src='{:uc_sell($v.ubh)['tx']}' class='avatar'><dt><cite>{if uc_sell($v.ubh)['bh']==session('usercode')}<font color="#247fbd">您</font>{else}<font color="#ff0000">对方</font>{/if}</cite><cite>拒绝原因</cite><cite>{$v.sj}</cite></dt>
	<dd> {$v.txt} </dd>
	</dl>{/if}
	{if $v.role=='message'}
	<dl class='fortips'><p>【{$v.sj}】{if $v.ubh==session('usercode')}<font color="#247fbd">您</font>{else}<font color="#ff0000">对方</font>{/if} {$v.txt}</p></dl>{/if}
	{if $v.role=='admin'}<dl><img src='//iu.huzhan.com/sign/huzhan.jpg' class='avatar'><dt><cite><b class='green'>平台客服</b></cite><cite>常规介入</cite><cite>{$v.sj}</cite></dt>
	<dd>{$v.txt}<br />
	</dd>
	</dl>{/if}
{/foreach}				
</div>
<script type="text/javascript">
layer_photos('.dispute_html .bfiles');
</script>
<input type="hidden" name="layer" value="1">
<input type="hidden" name="role" value="{:input('role')}">
<input type="hidden" name="utime" value="{:input('utime')}">
<input type="hidden" name="action" value="back_history">
<input type="hidden" name="number" value="160747796449">
<input type="hidden" name="passkey" value="{:passkey()}">
</form>

<script type="text/javascript">
var zindex=parent.layer.zIndex;//当前层INDEX
layer.title('<font color=red style="font-weight:700;font-size:14px;">退款历史记录（订单：160747796449）</font>');
 layui.use('form', function(){
 var form = layui.form();
 form.verify({
	 	reason_txt: function(value) {
			if($.trim(value).length<10)  return '原因不能少于10个字！';
		}
});
form.on('submit(main)', function(data) {
	layer.load();
	dform(data.field,'order');
return false;
});

form.on('checkbox(upbm)',function(data){
		var $div=$(data.elem).closest(".layui-form-item");
		if(data.elem.checked){
			$div.removeClass("upbm_not");
			$('.layui-textarea').attr('placeholder','请说明修改退款金额原因，不能少于10个字！');
			$('.lay-submit').val('确认修改');
		}else{
			$div.addClass("upbm_not");
			$('.layui-textarea').attr('placeholder','请说明退款历史记录（订单：160747796449）原因，不能少于10个字！');
			$('.lay-submit').val('确认补充');
		}
});

form.on('radio(backtype)',function(data){
		var $div=$(data.elem).closest(".layui-form-item").find('.backmoney_box');
		if(data.elem.value=='part'){
			$div.show();
		}else{
			$div.hide();
		}
});
form.on('radio(cashed_type)',function(data){
	    $('.layui-btn-cashed').val($(data.elem).data('title'));
	    $('.cashed_box').hide();
		$('.cashed_box_'+data.value).show();
});

form.on('select(main_reason)',function(data){
		$(data.elem).closest(".layui-form-item").find('.layui-form-mid').html(data.elem.value=='网盘失效'?'注：如果您不需要了，请在下方明确告知卖家不要再发货！':'');
});

	form.render(); //更新全部
$('.upbm_label').click(function(){$(this).prev().click();form.render('checkbox')});
});
 document.onkeydown = function(event) {
        var target, code, tag;
        if (!event) {
            event = window.event; //针对ie浏览器
            target = event.srcElement;
            code = event.keyCode;
            if (code == 13) {
                tag = target.tagName;
                if (tag == "TEXTAREA") { return true; }
                else { return false; }
            }
        }
        else {
            target = event.target; //针对遵循w3c标准的浏览器，如Firefox
            code = event.keyCode;
            if (code == 13) {
                tag = target.tagName;
                if (tag == "INPUT") { return false; }
                else { return true; }
            }
        }
    };
if(typeof revise_money == 'function') revise_money();

</script>